package jms.producer;

import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * 生产者启动程序
 * 
* Created by WangXJ
* 2018-06-12 14:04
*/
public class AppProducer {

	public static void main(String[] args) {
		ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("producer.xml");
		ProducerService service = context.getBean(ProducerService.class);
		//发送消息
		for(int i=0;i<100;i++) {
			service.sendMessage("快使用神奇宝贝吧~  "+i);
		}
		context.close();
	}

}
